import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";

// 引入ArcoDesignUI库
import ArcoVue from "@arco-design/web-vue";
import "@arco-design/web-vue/dist/arco.css";

// 引入pinia状态管理工具
import { createPinia } from "pinia";

// md编辑器CSS
import "bytemd/dist/index.css";
// 引入高亮css
import "highlight.js/styles/vs.css";

import { debounce } from "lodash";

const resizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends resizeObserver {
  constructor(callback: any) {
    callback = debounce(callback, 100);
    super(callback);
  }
};

const app = createApp(App);
app.use(createPinia());
app.use(ArcoVue);
app.use(router).mount("#app");
